<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
  
    <link rel="stylesheet" type="text/css" href="/Public/admin/Css/bootstrap.min.css" />
     <link rel="stylesheet" type="text/css" href="/Public/admin/Css/ui.css" />
      <link rel="stylesheet" type="text/css" href="/Public/admin/Css/Admin-default.css" />
   
</head>
<body>
<div class="page-content-wrap">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="panel panel-default">
                                <div class="panel-body">
<div id="reply-statistic">
    <div class="questionnaire-info">
        <div  class="questionnaire-title">
            <?php switch($questionnaire["type"]): case "survey": ?><span class="label label-danger"><i class="fa fa-tag"></i>调研卷</span><?php break;?>
                <?php case "exam": ?><span class="label label-warning"><i class="fa fa-tag"></i>考试卷</span><?php break; endswitch;?>

            <h2><?php echo ($questionnaire["name"]); ?></h2>
        </div>

        <blockquote>
            <p><?php echo ($questionnaire["description"]); ?></p>
        </blockquote>

        <?php if(($questionnaire["type"]) == "exam"): ?><div class="widget widget-warning widget-item-icon">
                <div class="widget-item-left">
                    <span class="fa fa-user"></span>
                </div>
                <div class="widget-data">
                    <div class="widget-title"    style="font-family: '华文行楷'">平均分: <?php echo ($questionnaire["average"]); ?></div>

                    <div class="widget-title"    style="font-family: '华文行楷'">最高分: <?php echo ($questionnaire["max_score"]); ?></div>
                    <div class="widget-subtitle" style="font-family: '华文新魏'">由 <?php echo ($questionnaire["max_nicknames"]); ?> 获得</div>

                    <div class="widget-title"    style="font-family: '华文行楷'">最低分: <?php echo ($questionnaire["min_score"]); ?></div>
                    <div class="widget-subtitle" style="font-family: '华文新魏'">由 <?php echo ($questionnaire["min_nicknames"]); ?> 获得</div>
                </div>
            </div><?php endif; ?>
    </div>

    <div class="statistic">
        <?php if(is_array($questions)): $i = 0; $__LIST__ = $questions;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$question): $mod = ($i % 2 );++$i;?><div class="question">
                <?php if(($question["questionnaire_type"]) == "exam"): ?><div class="extend-info">
                        <div class="rate">
                            <p>准确率/%</p>
                            <input class="knob" data-width="100" data-height="100" data-fgColor="#FD421C" value="<?php echo ($question["rate"]); ?>"/>
                        </div>
                        <div class="extend-detail">
                            <div class="right-cnt">
                                <p>正确人数: <?php echo ($question["rightCnt"]); ?></p>
                            </div>
                            <div class="false-cnt">
                                <p>错误人数: <?php echo ($question["falseCnt"]); ?></p>
                            </div>
                            <div class="stardard">
                                <p>标准答案:</p>
                                <p class="standard-highlight">
                                    <?php if(is_array($question["standard"])): foreach($question["standard"] as $key=>$item): echo ($item); ?> <br /><?php endforeach; endif; ?>
                                </p>
                            </div>
                        </div>
                    </div><?php endif; ?>

                <div class="info">
                    <p class="name"><?php echo ($i); ?> <?php echo ($question["name"]); ?></p>

                    <ul class="options">
                        <?php if(is_array($question["options"])): $optionIndex = 0; $__LIST__ = $question["options"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$option): $mod = ($optionIndex % 2 );++$optionIndex;?><li>
                                <?php switch($option["type"]): case "radio": ?><div class="detail"><input type="radio"/> <strong class="option-index"><?php echo ($optionIndex); ?></strong> <?php echo ($option["text"]); ?></div>
                                            <?php if(isset($option["count"])): ?><div class="option-statistic">该项勾选人数: <?php echo ($option["count"]); ?></div><?php endif; break;?>
                                        <?php case "checkbox": ?><div class="detail"><input type="checkbox"/> <strong class="option-index"><?php echo ($optionIndex); ?></strong> <?php echo ($option["text"]); ?></div>
                                            <?php if(isset($option["count"])): ?><div class="option-statistic">该项勾选人数: <?php echo ($option["count"]); ?></div><?php endif; break;?>
                                        <?php case "radio_othertext": ?><div class="detail"><input type="radio"/><strong class="option-index"><?php echo ($optionIndex); ?></strong> <div>其他<br /> <textarea cols="30" rows="5"></textarea></div></div>
                                            <?php if(isset($option["count"])): ?><div class="option-statistic">
                                                    该项勾选人数: <?php echo ($option["count"]); ?>
                                                    <div class="reply-list">
                                                        回答摘要
                                                        <textarea cols="30" rows="5"><?php if(is_array($option["replyList"])): foreach($option["replyList"] as $key=>$reply): echo ($reply); ?>------------------------------<?php endforeach; endif; ?></textarea>
                                                    </div>
                                                </div><?php endif; break;?>
                                        <?php case "checkbox_othertext": ?><div class="detail"><input type="checkbox"/> <strong class="option-index"><?php echo ($optionIndex); ?></strong> <div>其他<br /> <textarea cols="30" rows="5"></textarea></div></div>
                                            <?php if(isset($option["count"])): ?><div class="option-statistic">
                                                    该项勾选人数: <?php echo ($option["count"]); ?>
                                                    <div class="reply-list">
                                                        回答摘要
                                                        <textarea cols="30" rows="5"><?php if(is_array($option["replyList"])): foreach($option["replyList"] as $key=>$reply): echo ($reply); ?>------------------------------<?php endforeach; endif; ?></textarea>
                                                    </div>
                                                </div><?php endif; break;?>
                                        <?php case "text": ?><div class="detail"><textarea cols="30" rows="5"></textarea></div>
                                            <?php if(isset($option["replyList"])): ?><div class="option-statistic">
                                                    <div class="reply-list">
                                                        回答摘要
                                                        <textarea cols="30" rows="5"><?php if(is_array($option["replyList"])): foreach($option["replyList"] as $key=>$reply): echo ($reply); ?>------------------------------<?php endforeach; endif; ?></textarea>
                                                    </div>
                                                </div><?php endif; break; endswitch;?>
                            </li><?php endforeach; endif; else: echo "" ;endif; ?>
                    </ul>
                </div>
            </div><?php endforeach; endif; else: echo "" ;endif; ?>
    </div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>